import request from "./request";

const baseURL = '/config'

//
const detail = () => {
  return request.doRequest(`${baseURL}/detail`, {})
};

const get = (params) => {
  return request.doRequest(`${baseURL}/get`, {params})
};

const set = (data) => {
  return request.doRequest(`${baseURL}/set`, { method: 'POST', data })
};

const checkUpdate = (params) => {
  return request.doRequest(`${baseURL}/checkUpdate`, {params})
};

const doUpdate = (params) => {
  return request.doRequest(`${baseURL}/doUpdate`, {params})
};

const restart = () => {
  return request.doRequest(`${baseURL}/restart`, {})
};


const ConfigApi = {
  detail, get, set, checkUpdate, doUpdate, restart
};

export default ConfigApi;
